#include "EventManager.h"

EventManager *EventManager::_instance = NULL;
EventManager *EventManager::instance()
{
    if(!_instance)
        _instance = new EventManager;
    return _instance;
}
EventManager::EventManager()
{
    //ctor
}

EventManager::~EventManager()
{
    //dtor
}


void EventManager::setWindow(Window* window)
{
    _window = window;
}

bool EventManager::keyPressed(sf::Keyboard::Key key)
{
    return _window->keyPressed(key);
}

bool EventManager::mouseClicked(sf::Mouse::Button button)
{
    return _window->mouseClicked(button);
}

sf::Vector2i EventManager::mouseCoords()
{
    return _window->mouseCoords();
}


sf::Event& EventManager::event()
{
    return _event;
}
